Public Class ProductionStatuss
    Inherits DABase

    Protected Overrides Function getDeleteCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductionStatusDeleteCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PS_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PS_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ADJUST_QUANTITY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADJUST_QUANTITY", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CREATED_BY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CREATED_BY", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CREATED_DATE", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CREATED_DATE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "EST_TIME_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PREV_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PREV_EST_TIME_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_LAST_UPDATE", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LAST_UPDATE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_OI_ID_FK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "OI_ID_FK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_A50P_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_A50P_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_B50P_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_B50P_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_UPDATED_BY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "UPDATED_BY", System.Data.DataRowVersion.Original, Nothing))

        Return sqlCommand
    End Function

    Protected Overrides Function getInsertCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductionStatusInsertCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@OI_ID_FK", System.Data.SqlDbType.Int, 4, "OI_ID_FK"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LAST_UPDATE", System.Data.SqlDbType.DateTime, 8, "LAST_UPDATE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_A50P_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_A50P_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_B50P_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_B50P_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, "EST_TIME_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PREV_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, "PREV_EST_TIME_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CREATED_BY", System.Data.SqlDbType.Int, 4, "CREATED_BY"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CREATED_DATE", System.Data.SqlDbType.DateTime, 8, "CREATED_DATE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UPDATED_BY", System.Data.SqlDbType.Int, 4, "UPDATED_BY"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ADJUST_QUANTITY", System.Data.SqlDbType.Int, 4, "ADJUST_QUANTITY"))

        Return sqlCommand
    End Function

    Protected Overrides Function getSelectCommand(ByVal keys() As Object) As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductionStatusSelectCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))

        Dim param As SqlParameter
        param = New SqlParameter("@OI_ID_FK", System.Data.SqlDbType.Int, 4, "OI_ID_FK")
        param.Value = keys(0)
        sqlCommand.Parameters.Add(param)
        param = New SqlParameter("@WEEK", System.Data.SqlDbType.Int, 4)
        param.Value = keys(1)
        sqlCommand.Parameters.Add(param)
        param = New SqlParameter("@YEAR", System.Data.SqlDbType.Int, 4)
        param.Value = keys(2)
        sqlCommand.Parameters.Add(param)

        Return sqlCommand
    End Function

    Protected Overrides Function getUpdateCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[ProductionStatusUpdateCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@OI_ID_FK", System.Data.SqlDbType.Int, 4, "OI_ID_FK"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LAST_UPDATE", System.Data.SqlDbType.DateTime, 8, "LAST_UPDATE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_A50P_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_A50P_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@QUANTITY_B50P_COMPLETED", System.Data.SqlDbType.Int, 4, "QUANTITY_B50P_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, "EST_TIME_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PREV_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, "PREV_EST_TIME_COMPLETED"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CREATED_BY", System.Data.SqlDbType.Int, 4, "CREATED_BY"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CREATED_DATE", System.Data.SqlDbType.DateTime, 8, "CREATED_DATE"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UPDATED_BY", System.Data.SqlDbType.Int, 4, "UPDATED_BY"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ADJUST_QUANTITY", System.Data.SqlDbType.Int, 4, "ADJUST_QUANTITY"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PS_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PS_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ADJUST_QUANTITY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADJUST_QUANTITY", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CREATED_BY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CREATED_BY", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CREATED_DATE", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CREATED_DATE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "EST_TIME_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PREV_EST_TIME_COMPLETED", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PREV_EST_TIME_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_LAST_UPDATE", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LAST_UPDATE", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_OI_ID_FK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "OI_ID_FK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_A50P_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_A50P_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_B50P_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_B50P_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_QUANTITY_COMPLETED", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "QUANTITY_COMPLETED", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_UPDATED_BY", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "UPDATED_BY", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PS_ID_PK", System.Data.SqlDbType.Int, 4, "PS_ID_PK"))

        Return sqlCommand
    End Function
End Class
